const  commonConfig =  require('./webpack.common')
const {merge} = require('webpack-merge')

const path = require('path')
const webpack = require('webpack'); // webpack核心

module.exports = merge(commonConfig,{
    mode:'development',
    devtool: 'eval-source-map', // 报错的时候在控制台输出哪一行报错
    module:{
        // rules:[
        //   {
        //     // 编译前通过eslint检查代码 (注释掉即可取消eslint检测)
        //     test: /\.(ts|tsx|js|jsx)?$/,
        //     enforce: 'pre',
        //     use: ['source-map-loader' /* , 'eslint-webpack-plugin' */],
        //     include: path.resolve(__dirname, 'src'),
        //   },
        // ]
    },
    devServer: {
        contentBase: path.join(__dirname, 'dist'),
        port: 9000,
        open: true,
        hot: true
    },
    resolve: {
      extensions: ['.js', '.jsx', '.ts', '.tsx', '.less', '.css', '.wasm','.vue'], // 后缀名自动补全
      alias: {
        '@': path.resolve(__dirname, 'src'),
        '@assets': path.resolve(__dirname, 'src/assets'),
        '@component': path.resolve(__dirname, 'src/component'),
       
      },
    },
})
